package com.xgjweb.fsi.action;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.xgjweb.common.action.XgjWebAction;
import com.xgjweb.fsi.domain.Link;
import com.xgjweb.fsi.service.ILinkService;

/**
 */
public class LinkAction extends XgjWebAction {
	ILinkService linkService;

	public void setLinkService(ILinkService linkService) {
		this.linkService = linkService;
	}
	
	/**
	 * 添加链接
	 */
	public Integer initSort()throws Exception{
		return linkService.initSort();
	}
	/**
	 * 添加链接
	 */
	public ActionForward addLink(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		return linkService.addLink(mapping, form, request, response);
	}

	/**
	 * 删除链接
	 */
	public Boolean deleteLink(Link link) throws Exception {
		return linkService.deleteLink(link);
	}

	/**
	 * 查询链接
	 */
	public List<Link> queryLink() throws Exception {
		return linkService.queryLink();
	}

	/**
	 * 查找链接
	 */
	public Link findLink(Link link) throws Exception {
		return linkService.findLink(link);
	}

	/**
	 * 更新链接
	 */
	public Boolean updateLink(Link link) throws Exception {
		return linkService.updateLink(link);
	}
}
